package de.baumann.browser.activitys

import android.os.Build
import android.text.Html
import de.baumann.browser.R
import de.baumann.browser.base.BaseOdinActivity
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.IBaseView
import kotlinx.android.synthetic.main.activity_notice_detail.*
import kotlinx.android.synthetic.main.include_tool_bar.*

/**
 *@author:
 *@date:2019/1/2 18:42
 *@discription: 通知详情
 */
class NoticeDetailActivity : BaseOdinActivity<IBaseView, BasePresenter<IBaseView>>() {

    override fun createPresenter(): BasePresenter<IBaseView>? {
        return null
    }

    override fun createView(): IBaseView? {
        return null
    }

    override fun getLayout(): Int {
        return R.layout.activity_notice_detail
    }

    override fun initView() {
        initToolbar(commToolBar, null)
    }

    override fun initData() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            tvNoticeContent.text = Html.fromHtml(intent.getStringExtra("content"), Html.FROM_HTML_MODE_LEGACY)
        } else {
            tvNoticeContent.text = Html.fromHtml(intent.getStringExtra("content"))
        }

        tvNoticeTitle.text = intent.getStringExtra("title")
        tvNoticeTime.text = intent.getStringExtra("time")

    }
}
